import React, { Component } from 'react'
import Far from './components/Far'
import PubSub from 'pubsub-js'
export default class App extends Component {
  state = {
    money: '一百万',
  }
  render() {
    return (
      <div>
        <button
          onClick={() => {
            PubSub.unsubscribe('howFindMoney')
          }}
        >
          清除找富婆的订阅
        </button>
        <button
          onClick={() => {
            PubSub.unsubscribe(localStorage.getItem('subId'))
          }}
        >
          清除Far找富婆的订阅
        </button>
        <button
          onClick={() => {
            PubSub.clearAllSubscriptions()
          }}
        >
          清除所有的订阅
        </button>
        <hr />
        <Far></Far>
      </div>
    )
  }
}
